﻿using Nature.Core.Distributed;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Test.Events;

namespace Test.Client
{
    class Program
    {
        static void Main(string[] args)
        {
            ServiceBusManager.Start();

            while (true)
            {
                //控制台输入一个值
                string s = Console.ReadLine();
                //发送消息
                var message = new TestEvent
                {
                     Message = s
                };
                ServiceBusManager.Publish(message);
                Console.WriteLine("发布消息 Message={0}", message.Message);
            }
        }
    }
}
